﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.BLL
@model ZoomLa.SQLDAL.SQL.PageSetting
@{ 
    Model.cols = 7;
    Model.url = "PubInfo";
}
@functions{
    B_User buser = new B_User();
    public string GetUserName(int uid)
    {
        return buser.GetSelect(uid).UserName;
    }
    public string GetStatus(int pubstrat)
    {
        switch (pubstrat)
        {
            case 0:
                return "<font color=green>未审核</font>";
            case 1:
                return "<font color=red>已审核</font>";
            default:
                return "";
        }
    }
}
<div id="EGV" class="margintop10">
    <table class="table table-striped table-bordered table-hover text-center">
        @if (Model.itemCount > 0)
        {
            <tr><th>ID</th><th>标题</th><th>IP地址</th><th>发表人</th><th>发表日期</th><th>状态</th><th>操作</th></tr>
            foreach (DataRow dr in Model.dt.Rows)
            {
                <tr>
                    <td>@dr["ID"]</td>
                    <td>@dr["PubTitle"]</td>
                    <td>@dr["PubIP"]</td>
                    <td>@GetUserName(DataConverter.CLng(dr["PubUserID"]))</td>
                    <td>@DataConverter.CDate(dr["PubAddTime"])</td>
                    <td>@MvcHtmlString.Create(GetStatus(DataConverter.CLng(dr["Pubstart"])))</td>
                    <td>
                        <a href="javascript:;" onclick="showinfo(this);">查看详情</a> 
                        <a href="javascript:;" onclick="mvcpage">通过审核</a> 
                        <a href="javascript:;" onclick="">取消审核</a> 
                        <a href="javascript:;" onclick="">修改</a> 
                        <a href="javascript:;" onclick="">删除</a> 
                    </td>
                </tr>
            }
            Html.Partial("_page", Model);
        }
        else
        {
            <tr><td colspan="7">当前没有评论信息</td></tr>
        }
    </table>
</div>